package tests;

import tester.*;

@Example
public class AnnotationTests {
	
	int[] sequentialArray;
	
	public AnnotationTests(){}
	
	@ClassSetup
	protected void classSetup(){
		sequentialArray = new int[5];
	}
	
	@ClassTearDown
	protected void classTearDown(){
		sequentialArray = null;
	}
	
	@BeforeTests
	protected void testInit(){
		for(int i = 0; i < sequentialArray.length; i++){
			sequentialArray[i] = i;
		}
	}
	
	@AfterTests
	protected void testTearDown(){
		for(int i = 0; i < sequentialArray.length; i++){
			sequentialArray[i] = -1;
		}
	}
	
	@TestMethod
	public void runTest(Tester t){
		t.checkExpect(sequentialArray, new int[]{0, 1, 2, 3, 4});
		sequentialArray[0] = -100;
	}
	
	@TestMethod
	public void runOtherTest(Tester t){
		t.checkExpect(sequentialArray, new int[]{0, 1, 2, 3, 4});
	}
	
	public static void main(String[] args){
		Tester.runFullReport(new AnnotationTests());
	}
	
}
